package com.iflysse.services;

import com.iflysse.pojo.bo.CommonBoResp;
import com.iflysse.pojo.bo.req.UserAccountIdAndPasswordBoReq;
import com.iflysse.pojo.bo.req.UserBoReq;
import com.iflysse.pojo.bo.req.UsernameAndEmailBoReq;
import com.iflysse.pojo.bo.resp.UserAccountIdBoResp;
import com.iflysse.pojo.bo.resp.UserBoResp;
import com.iflysse.pojo.bo.resp.UserTeacherInfoBoResp;

import java.sql.SQLException;

public interface UserService {


    /**
     * 用户登录
     * @param userBoReq
     * @return
     */
    UserBoResp login(UserBoReq userBoReq) throws SQLException;

    /**
     * 根据账户编号和角色查询出对应的教师编号或学生编号
     * @param accountId
     * @param role
     * @return
     */
    UserTeacherInfoBoResp queryIdByAccountIdAndRole(String accountId, String role)throws SQLException ;

    /**
     * 检查用户名和邮箱是否一致
     * @param usernameAndEmailBoReq
     * @return
     */
    UserAccountIdBoResp checkUserNameAndEmail(UsernameAndEmailBoReq usernameAndEmailBoReq) throws SQLException;


    /**
     * 修改密码
     * @param userAccountIdAndPasswordBoReq
     * @return
     */
    CommonBoResp updateUserPassword(UserAccountIdAndPasswordBoReq userAccountIdAndPasswordBoReq) throws SQLException;


}
